package dao

import "car-rental-08-14/global"

func GetValeInfo[T any](where *T, data *T) error {
	return global.DB.Where(where).Limit(1).Find(&data).Error
}

func GetTableInfo[T any](where *T, data *[]T) error {
	return global.DB.Where(where).Find(&data).Error
}

func UpdatedInfo[T any](data *T) error {
	return global.DB.Updates(&data).Error
}
